import React from "react"
import { ThemeProvider } from "./src/components"
import Layout from "./src/layout"

const WrapWithLayout = ({ element, props }) => {
  return <Layout {...props}>{element}</Layout>
}

export const wrapRootElement = ({ element }) => (
  <ThemeProvider>{element}</ThemeProvider>
)

export const wrapPageElement = WrapWithLayout
